package com.dhcc.bpm.modules.scf.util;

public class StringUtil {
    public String removeTrailingZeros(String numberString) {
        if (numberString.contains(".")) {
            // 如果包含小数点，去除末尾的零
            numberString = numberString.replaceAll("0*$", "");

            // 如果去除末尾零后，字符串以小数点结尾，也去除小数点
            numberString = numberString.replaceAll("\\.$", "");
        }
        return numberString;
    }
}
